<?php
class getRequestList extends ActionHandler
{
	function handleRequest($jsonData)
	{
		$data = $jsonData['params'];
		$guildId = $data['guildId'];
		$sql = "select a.requestId,b.name from ".$this->tables['request_profile']." a left join ".$this->tables['user_profile']." b on a.requestId = b.id where a.guildId = ".$guildId;
		$result = $this->db->query($sql);
		$i = 0;
		while ( $arr = $this->db->fetchArray($result))
		{
			$return[$i]['requestId'] = $arr['requestId'];
			$return[$i++]['requestName'] = $arr['name'];
		}
		return $return;
	}
}
	


?>